﻿@model CustomerAvatarModel
@using Nop.Web.Models.Customer;
@{
    Layout = "~/Views/Shared/_ColumnsTwo.cshtml";

    //title
    Html.AddTitleParts(T("PageTitle.Account").Text);
}
@section left
{
    @Html.Partial("MyAccountNavigation", Model.NavigationModel, new ViewDataDictionary())
}
@using (Html.BeginRouteForm("CustomerAvatar", FormMethod.Post, new { enctype = "multipart/form-data" }))
{

    <div class="features_items my-account-page"><!--features_items-->
        <h2 class="title text-center">@T("Account.MyAccount") - @T("Account.Avatar")</h2>
        <div class="custom-page-box-div">
            <div class="message-error">
                    @Html.ValidationSummary(true)
                </div>
                <div class="fieldset">
                    @if (!String.IsNullOrEmpty(Model.AvatarUrl))
                    {
                        <div class="image">
                            <img src="@(Model.AvatarUrl)" alt="avatar" />
                        </div>
                    }
                    <input name="uploadedFile" type="file" />
                </div>
                <div class="buttons">
                    <input type="submit" name="upload-avatar" class="button-1 btn btn-primary" value="@T("Common.Upload")" />
                    @if (!String.IsNullOrEmpty(Model.AvatarUrl))
                    {
                        <input type="submit" name="remove-avatar" class="button-2 btn btn-primary" value="@T("Account.Avatar.RemoveAvatar")" />
                    }
                </div>
                <div class="info">
                    @T("Account.Avatar.UploadRules")
                </div>
        </div>
    </div>

    
}